/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: GaoBo
 * Date: 2021-05-28
 * Time: 14:29
 */
public class Test {

    public static String reverse(String str) {
        if(str == null) return null;
        char[] chars = str.toCharArray();
        int i = 0;
        int j = str.length()-1;
        while (i < j) {
            char tmp = chars[i];
            chars[i] = chars[j];
            chars[j] = tmp;
            i++;
            j--;
        }
        return new String(chars);
        //return String.valueOf(chars);
    }

    public static void main(String[] args) {
        //abcdef  -> fedcba
        String str = "abcdef";
        String ret = reverse(str);
        System.out.println(ret);
    }

    public static boolean isAdmin(String userId){
        return userId.toLowerCase().equals("admin");
        // return "admin" == "admin";
    }
    public static void main1(String[] args){
        System.out.println(isAdmin("Admin"));
    }
}
